/**
 * 返回用户名和token的函数
 * @date 2021-03-22
 * @returns {any}
 */
function getToken() {
  let str = sessionStorage.getItem('USER_LOGIN')
  if (!str) {
    return null
  }
  let object = JSON.parse(str)
  let user = object.data
  let token = object.token
  return {
    username: user.userName,
    userPassword: user.userPassword,
    token,
  }
}
